package com.tanhua.server.service;

import com.tanhua.model.db.User;
import com.tanhua.model.vo.HuanXinUserVo;
import com.tanhua.server.interceptor.UserHolder;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class HuanxinService {


    /**
     * 获取环信账号密码
     * @return
     */
    public HuanXinUserVo getHuanxinUser() {
        User user = UserHolder.getUser();
        HuanXinUserVo vo = new HuanXinUserVo();
        vo.setUsername(user.getHxUser());
        vo.setPassword(user.getHxPassword());
        log.debug("登陆环信成功：" + user.getHxUser());
        return vo;
    }
}
